import Vue from 'vue'
import Vuex from 'vuex'

// 自动导入
let files = require.context("./modules", false, /\.js$/);
let modules = {}
files.keys().forEach(filename => {
  let moduleName = filename.replace(/(\.\/|\.js)/g, "")
  modules[moduleName] = files(filename).default
})

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
  },
  getters: {
  },
  mutations: {
  },
  actions: {
  },
  modules
})
